package com.one.group.admin.config;


import com.one.group.admin.converter.DateConverter;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * {@code @Create:}  2025-09-28  14 : 55
 * {@code @Author:} Cherry
 * {@code @ToUser:} 凡是发生,皆有利于我。
 * ------------------------------------
 * {@code @note:}
 */
//@Configuration//springboot在启动的时候加载java配置，检测是否实现了WebMvcConfigurer接口
//如果实现了，自动调用addInterceptors往springmvc底层添加拦截器
public class MyMvcConfiguration implements WebMvcConfigurer {
    //注册日期转换器
    @Override
    public void addFormatters(FormatterRegistry registry) {
        registry.addConverter(new DateConverter());
    }
}
